<template>
  <el-scrollbar class="page-container">
    <div class="page-header">
      <div class="page-tile">
        <el-button
          class="icon-button back-button"
          style="margin-right: 10px"
          @click="$router.back()"
        >
          <i class="el-icon-arrow-left" style="font-size: 12px"></i>
        </el-button>
        <span>
          <link-button :content="$t('route.clientList')" @click="$router.push('clientList')"></link-button> / {{ $t('clientListManage.remote') }} / {{clientName}}
        </span>
        <i v-if="false" class="iconfont iconzhongyiicon_gaojing"></i>
      </div>
      <div class="left-wrapper"></div>
      <div class="right-wrapper"></div>
    </div>
    <div class="page-content">
      <div class="content-wrapper">
        <el-card>
          <iframe :src="meshSrc" frameborder="0" width="100%" style="min-height:500px" height="650" ></iframe>
        </el-card>
      </div>
    </div>
  </el-scrollbar>
</template>
<script lang="ts">
import Vue from "vue";
import BasicTable from "../../../../components/Basic/Table/BasicTable.vue";
import LinkButton from "../../../../components/Basic/Button/LinkButton.vue";
export default Vue.extend({
  components: {
    BasicTable,
    LinkButton
  },
  data() {
    return {
      meshData: '',
      clientName: '',
      meshSrc: ''
    };
  },
  mounted() {
    this.meshData = JSON.parse((this as any).$route.query.mesh)
    // console.log(this.meshData);
    this.clientName = (this.meshData as any).id.id.name
    const url = (this as any).meshData.url;
    // console.log(url)
    this.meshSrc = `${url}/?login=${(this.meshData as any).meshLoginToken}&node=${(this.meshData as any).id.id.meshagent_id}&viewmode=11&hide=31`
    // console.log(this.meshSrc)
  },
  methods: {
    
  },
});
</script>
<style lang="scss" scoped>
.page-container {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #eff1f4;

  .page-header {
    height: 60px;
    background-color: #ffffff;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #d9d9d9;

    .page-tile {
      color: #031129;
      font-size: 16px;
      margin-left: 20px;
      display: flex;
      align-items: center;

      .back-button {
        width: 24px;
        height: 24px;
        padding: 0px 6px;
      }

      .iconzhongyiicon_gaojing {
        margin-left: 5px;
      }
    }
  }

  .page-content {
    height: calc(100vh - 110px);
    overflow: hidden;
    flex-grow: 1;

    .content-wrapper {
      padding: 15px;

      .content-info {
        margin-bottom: 20px;

        ::v-deep .el-form-item {
          margin-bottom: 0px;
          margin-right: 40px;
        }

        ::v-deep .el-form-item__label,
        ::v-deep .el-form-item__content {
          color: #999999;
          font-size: 12px;
        }

        ::v-deep .el-form-item__content {
          color: #333333;
        }
      }
    }
  }
}

.table-left-options {
  display: flex;
}

.table-right-options {
  display: flex;

  .setting-button {
    margin-right: 10px;
  }
}
</style>
